window: Don't inherit cursors across surfaces
authorMatthias Clasen <mclasen@redhat.com>
Sat, 4 May 2019 16:21:33 +0000 (16:21 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 28 May 2019 20:25:15 +0000 (20:25 +0000)
I can't think of a case where this is the desired
behavior. So, instead of setting an explicit cursor
on all popups, just stop walking the parents at
surface boundaries.

gtk/gtkwindow.c

index ca8d34e05385da5f39b1d97dca4a1430503c88e5..af33165a5a7f47420ca3cdea2d6c13c8613332d6 100644 (file)
@@ -9923,6 +9923,10 @@ update_cursor (GtkWindow *toplevel,
           if (grab_widget && target == grab_widget)
             break;
 
+          /* Don't inherit cursors across surfaces */
+          if (surface != gtk_widget_get_surface (target))
+            break;
+
           cursor = gtk_widget_get_cursor (target);
 
           if (cursor)